<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
  <head>
  
  <style type="text/css">
  table{
  	border-collapse: collapse;
  }
  table th,table td{
  	border:1px solid black;
  }
  </style>
    
    <title>My JSP 'sub_manage.jsp' starting page</title>
    <base href="<%=basePath%>">
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript" src="bootstrap-rs/jquery.min.js"></script>
  </head>
  
  <body>
  
    <div align="left" ><font>积分管理</font></div>
    <table id="tt" class="easyui-datagrid" style="width:100%;height:auto" >
	<thead>
		<tr>
			<th field="name1" height="40px" colspan="6">资料核对</th>
		</tr>                          
	</thead>                           
	<tbody>                            
		<tr>                           
			<td>手机号码</td>            
			<td>${customer.vMobile}</td>            
			<td>客户姓名</td>            
			<td>${customer.vUsername}</td>                       
		</tr>                          
		<tr>                           
			<td>品牌</td>            
			<td>${customer.nBrandname}</td>            
			<td>地址</td>            
			<td>${customer.vAddressname}</td>                      
		</tr>                          
		<tr>                           
			<td>县市</td>            
			<td></td>            
			<td>地区</td>            
			<td>${ccustomer.vAreaname}</td>                       
		</tr>                          
		<tr>                           
			<td>营业厅</td>            
			<td>${customer.vShop}</td>            
			<td>是否已经申请</td>
			<c:if test="${customer.vIntfOpen eq '0'}"><td style="color: red">未申请</td></c:if>          
			<c:if test="${customer.vIntfOpen eq '1'}"><td style="color: red">已申请</td></c:if>                            
		</tr>    
		<tr>                           
			<td>开户时间</td>            
			<td>${customer.dOpentime}</td>            
			<td>等级</td>            
			<td>${customer.nGradename}</td>                     
		</tr>  
		<tr>                           
			<td>客户经理</td>            
			<td>黎明</td>            
			<td>证件号码</td>            
			<td>${customer.nCardno}</td>                     
		</tr>  
		<tr>                           
			<td>证件类型</td>            
			<td>${customer.vCertype}</td>            
			<td>三个月话费</td>            
			<td>${telFee}</td>                     
		</tr>  
	   <tr>                           
			<td colspan="4">
			<div align="right">
			<c:if test="${customer.vIntfOpen eq '0'}">
		    <input id="apply" type="button" value="立即申请" onclick="apply(${customer.vMobile})">
		    <input id="ane" type="button" value="申请并兑换" onclick="ane(${customer.vMobile})">
		    <input id="exchange" type="button" value="立即兑换" disabled="disabled">
		    </c:if>
			<c:if test="${customer.vIntfOpen eq '1'}">
		    <input id="apply" type="button" value="立即申请" disabled="disabled">
		    <input id="ane" type="button" value="申请并兑换" disabled="disabled">
		    <input id="exchange" type="button" value="立即兑换" onclick="ane(${customer.vMobile})">
		    </c:if>
			</div>
			</td>                                  
		</tr>                        
	</tbody>                           
</table>
    
  </body>
<script type="text/javascript">
	function apply(phoneNumber){
		if(${telFee} > 0){
		alert("申请成功");
		window.location.href="/crm/subs/subapply?mobile=" + phoneNumber;
		}else{
		alert("申请积分失败，话费小于等于零");
		}
	}
	
	function ane(phoneNumber){
		alert('立即兑换！');
		window.location.href="/crm/subs/exchange?mobile=" + phoneNumber;
	}
	
	
</script>
</html>
